<template>
	<view class="videoright-container">
		<view class="likeIcon">
			<image :src="likeBtnUrl" @click="changeStatus"></image>
			<span>{{ likecount }}</span>
		</view>
		<view class="shareIcon">
			<image src="../static/videoIcon/分享1.png"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'videoright',
		props: {
			id: {
				required: true,
				type: Number
			},
			likestatus: {
				default: false,
				type: Boolean
			},
			likecount: {
				default: 0,
				type: Number
			}
		},
		data() {
			return {
				likeBtnUrl: this.likestatus ? require('../static/videoIcon/点赞4.png') : require('../static/videoIcon/点赞3.png')
			}
		},
		methods: {
			changeStatus() {
				this.likeBtnUrl = !this.likestatus ? require('../static/videoIcon/点赞4.png') : require('../static/videoIcon/点赞3.png')
				this.$emit('changeLikeStatus', {id: this.id, likestatus: this.likestatus, likecount: this.likecount})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.videoright-container {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		position: absolute;
		z-index: 100;
		bottom: 36.5vh;
		right: 1vw;
		color: #fff;
		.likeIcon {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			image {
				width: 100rpx;
				height: 100rpx;
			}
		}
		.shareIcon {
			margin-top: 40rpx;
			image {
				width: 80rpx;
				height: 80rpx;
			}
		}
	}
</style>
